import request from '@/utils/request'
// 查询权限表
export function getAccessTables(params) {
  return request({
    method: 'GET',
    url: '/backDB/access/list',
    params
  });
}
// 添加表或视图权限
export function addTablesManagement(params) {
  return request({
    method: 'POST',
    url: '/backDB/access/insert',
    params
  });
}
// 删除表或视图权限
export function deleteTablesManagement(data) {
  return request({
    method: 'POST',
    url: '/backDB/access/delete',
    data
  });
}
// 查询表或视图
export function getTable(params) {
  return request({
    method: 'GET',
    url: '/backDB/table/list',
    params
  });
}

// 查询角色列表
export function listRole(query) {
  return request({
    url: '/system/role/list',
    method: 'get',
    params: query
  })
}

// 权限修改
export function updateAccess(data) {
  return request({
    url: '/backDB/access/update',
    method: 'PUT',
    data
  })
}